package com.burgeon.backend.SHOP.mappers;

import com.burgeon.backend.SHOP.entity.Recommend;
import com.burgeon.backend.SHOP.entity.RecommendConfig;
import com.burgeon.backend.SHOP.entity.RecommendSwitch;
import com.burgeon.backend.SHOP.entity.RecommendUser;
import com.burgeon.backend.entity.TemplateSwitch;

import java.util.ArrayList;

public interface RecommendMapper {
    //获取推荐的优惠
    RecommendSwitch findRecommendSwitch(String token);
    //根据id查询优惠券的名字
    String findCouponById(String id);
    //注册成功，新建推荐表
    Integer addRecommend(String presentee,String referrer,String token,String account,String createTime);
   //根据用户id找用户信息
    RecommendUser findUserByReferrer(String id);
    //新增推荐人小程序码
    Integer addRecommendCode(String uid,String url,String token);
    //获取推荐人小程序码
    String getRecommendCode(String uid);
    //商城获取小程序的配置信息
    RecommendConfig getRecommendConfigByToken(String token);



    //后台获取推荐开关
    RecommendSwitch findRecommendSwitchByAccount(String account);
    //修改
    Integer updateRecommendSwitch(String rSwitch1,String rValue1,String rSwitch2,String rValue2,
                                  String rSwitch3,String rValue3,String rSwitch4,String rValue4,String account);
    //获取所有推荐信息
    ArrayList<Recommend> getRecommend(String account,int start);
    //获取推荐的总条数
    String getRecommendCount(String account);

    RecommendUser findUserById(String id);
    //搜索
    ArrayList<String> findUserByName(String name,String account);

    ArrayList<Recommend> findRecommendByRefer(String uid);

    //新增推荐图片的配置信息
    Integer addRecommendConfig(String recommendUrl,String newUrl,String name,String account,String token);
    //修改推荐图的配置信息
    Integer updateRecommendConfig(String recommendUrl,String newUrl,String name,String account);
    //删除推荐图的配置信息
    Integer deleteRecommendConfig(String id);
    //获取推荐配置图的信息
    RecommendConfig getRecommendConfigByAccount(String account);




}
